package cz.czu.pef.DataModelling.domainObjects;

public class CommonObjectImpl extends IdObjectImpl implements CommonObject
{
  private static final long serialVersionUID = 155760655222515550L;

  private String code;
  private String name;
  private String description;
	
	public CommonObjectImpl()
	{
		super();
	}
	
	public CommonObjectImpl(String code, String name, String description)
	{
		super();
		setCode(code);
		setName(name);
		setDescription(description);
	}
		
	/* (non-Javadoc)
	 * @see cz.czu.pef.DataModelling.domainObjects.CommonPersistenceObject#getName()
	 */
	@Override
	public String getName()
	{
		return name;
	}
	
	/* (non-Javadoc)
	 * @see cz.czu.pef.DataModelling.domainObjects.CommonPersistenceObject#setName(java.lang.String)
	 */
	@Override
	public void setName(String name)
	{
		this.name = name;
	}
	
	/* (non-Javadoc)
	 * @see cz.czu.pef.DataModelling.domainObjects.CommonPersistenceObject#getDescription()
	 */
	@Override
	public String getDescription()
	{
		return description;
	}
	
	/* (non-Javadoc)
	 * @see cz.czu.pef.DataModelling.domainObjects.CommonPersistenceObject#setDescription(java.lang.String)
	 */
	@Override
	public void setDescription(String description)
	{
		this.description = description;
	}

	/* (non-Javadoc)
	 * @see cz.czu.pef.DataModelling.domainObjects.CommonPersistenceObject#toString()
	 */
	@Override
	public String toString()
	{
		StringBuilder builder = new StringBuilder();
		builder.append("CommonObjectImpl [name=");
		builder.append(name);
		builder.append(", description=");
		builder.append(description);
		builder.append(", toString()=");
		builder.append(super.toString());
		builder.append("]");
		return builder.toString();
	}

	
	/* (non-Javadoc)
	 * @see cz.czu.pef.DataModelling.domainObjects.CommonPersistenceObject#getCode()
	 */
	@Override
	public String getCode()
	{
		return code;
	}

	
	/* (non-Javadoc)
	 * @see cz.czu.pef.DataModelling.domainObjects.CommonPersistenceObject#setCode(java.lang.String)
	 */
	@Override
	public void setCode(String code)
	{
		this.code = code;
	}
}
